import pymysql

db = pymysql.connect(host='localhost', port=3306, user='root',
                     password='guang', database='crawler')
cursor = db.cursor()  # 获取游标
cursor.execute("select * from demo_one")  # 执行sql语句
result = cursor.fetchone()  # 获取一条数据
print(result)
